#!/bin/bash
for ARG in "$@"; do
	read SENSOR OPTS <<< "$ARG"
	FNAME="/proc/acpi/thermal_zone/$SENSOR/temperature"
	[[ -r "$FNAME" ]] || continue
	read JUNK TEMP JUNK <<< "$(< "$FNAME")"
	echo "generic,g,$SENSOR,$OPTS,$TEMP"
done
